A motor is used for various purposes. The motor generates heat caused by the Joule heating of a coil included in a stator and the eddy current loss, hysteresis loss, and other losses of a rotor core. A technique is described in which in order to cool a motor, a cooling medium such as oil is used to cool the motor, for example, (Patent Literature 1).